package lang;

import gagazhn.console.actions.Action;

public class LogoutAction extends Action{
	
	@Override
	public void doAct(String[] args) {
		System.out.println("下线...");
		while (Main.logout() != Main.LOGOUT_SUCS) {
			System.out.println("Logout failed, retry later after 4s...");
			
			try {
				Thread.sleep(4000);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		
		if (args[0].equalsIgnoreCase("quit")) {
			Main.exitSystem();
		}
	}

}
